package com.sttk.secreconeclick.bookkeep.activity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.activity.EdgeToEdge;
import androidx.appcompat.app.AppCompatActivity;
import androidx.core.graphics.Insets;
import androidx.core.view.ViewCompat;
import androidx.core.view.WindowInsetsCompat;

import com.sttk.secreconeclick.bookkeep.BaseAc;
import com.sttk.secreconeclick.bookkeep.R;
import com.sttk.secreconeclick.bookkeep.databinding.ActivityAboutBinding;

public class AboutActivity extends BaseAc<ActivityAboutBinding> implements View.OnClickListener {


    @Override
    protected int onCreate() {
        return R.layout.activity_about;
    }

    @Override
    protected void initView() {
        mDataBinding.ivAboutBack.setOnClickListener(view -> getOnBackPressedDispatcher().onBackPressed());

        mDataBinding.llPrivacy.setOnClickListener(this);
        mDataBinding.llAgreement.setOnClickListener(this);
        mDataBinding.llFeedback.setOnClickListener(this);
    }

    @Override
    public void onClick(View view) {
        int id = view.getId();
        if (id == R.id.llAgreement) {//用户协议
            Intent bundle = new Intent(this, WebActivity.class);
            bundle.putExtra("type", 0);
            startActivity(bundle);
        } else if (id == R.id.llPrivacy) {//隐私政策
            Intent bundle = new Intent(this, WebActivity.class);
            bundle.putExtra("type", 1);
            startActivity(bundle);
        } else if (id == R.id.llFeedback) {//意见反馈
            startActivity(FeedbackActivity.class);
        }
    }

    @Override
    protected void initData() {

    }
}